using System.Collections.Generic;
using MongoDB.Bson;

namespace MongoScienceDAL.Core
{
    public interface IScienceRepository
    {
        //Needed for listing used collection names and posslbe ioc injection techniques
        string CollectionName { get; set; }

        //Query type functions
        IList<ScienceEntry> Query(QueryCriteria criteria);
        IPaginatedList<ScienceEntry> QueryPaged(QueryCriteria criteria, int pageIndex, int pageSize);
        long Count(QueryCriteria criteria);

        //Crud
        ObjectId Create(IDictionary<string, object> data);
        ScienceEntry Retrieve(ObjectId id);
        void Update(ScienceEntry entryToUpdate);
        void Delete(ObjectId id);

        //Special individual field operations
        object RetrieveField(ObjectId id, string key);
        void UpdateField(ObjectId id, string key, object value);
        bool HasField(ObjectId id, string key);
    }
}